From: Felix Fietkau Date: Sat, 31 May 2025 14:20:29 +0000 (+0200) Subject: jail: make udebug socket optional X-Git-Url: http://git.openwrt.org/%22http:/oss.oetiker.ch/rrdtool//%22/%22http:/oss.oetiker.ch/rrdtool/%22?a=commitdiff_plain;h=59d22013f9dd38f60b0f953534601532dd429c28;p=project%2Fprocd.git jail: make udebug socket optional Do not fail the jail mount if it does not exist, since udebugd is optional. Signed-off-by: Felix Fietkau --- diff --git a/jail/fs.c b/jail/fs.c index 423878b..d0ca2b6 100644 --- a/jail/fs.c +++ b/jail/fs.c @@ -70,7 +70,8 @@ static int do_mount(const char *root, const char *orig_source, const char *targe assert(!(inner && !orig_source)); if (source && is_bind && stat(source, &s)) { - ERROR("stat(%s) failed: %m\n", source); + if (error) + ERROR("stat(%s) failed: %m\n", source); return error; } diff --git a/jail/jail.c b/jail/jail.c index bd15b47..2326ce7 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -2708,7 +2708,7 @@ int main(int argc, char **argv) break; case 'D': opts.namespace |= CLONE_NEWNS; - add_mount_bind(udebug, 0, -1); + add_mount_bind(udebug, 0, 0); break; case 'l': opts.namespace |= CLONE_NEWNS;